import './assets/main.css'
import './assets/index.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'

import zhCn from 'element-plus/es/locale/lang/zh-cn'
import "./mock/index.js"



// import piniaPersist from 'pinia-plugin-persist'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
 // 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

import VueDOMPurifyHTML from 'vue-dompurify-html'
app.use(VueDOMPurifyHTML)

app.use(pinia)
// app.use(ElementPlus)
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
  })
app.mount('#app')
